{% load i18n %}

<tr>
    <td class="zeroed" colspan="2">
        <div id="search">
            <div style="float: right; vertical-align: top; height: 20px;">
                {% block feedicons %}
                    &nbsp;
                {% endblock %}
            </div>
            {% block search %}
                <form id="searchbox_{{ settings.GOOGLE_SEARCH_KEY }}" action="http://www.google.com/cse">
                    <input type="hidden" name="cx" value="{{ settings.GOOGLE_SEARCH_KEY }}" />
                    <input type="hidden" name="cof" value="FORID:0" />
                    <input name="q" tabindex="999" class="textfield" type="text" onclick="this.value=''" value="search" />
                    {% comment %}
                        <img align="absmiddle" src='{% app_media_prefix 'website' %}img/search.png' alt='search' onclick="this.parentNode.submit()"/>
                        <img src="http://www.google.com/coop/images/google_custom_search_smnar.gif" alt="Google Custom Search" align="absmiddle" />
                    {% endcomment %}
                </form>
            {% endblock %}
        </div>
        <div id="header-container">
            <div id="header">
                <a href="{{ settings.ROOT_URL }}">
                    <img src="{{ MEDIA_URL }}/img/masthead4.gif" alt="{{ settings.CONFERENCE_NAME|escape }}" />
                </a>
            </div>
            <div class="defloat">
                &nbsp;
            </div>
            <div id="dashboard">
                <div id="metanav">
                    {% block metanav %}
                        <ul>
                            <li class="first{% if user.is_anonmymous %} last{% endif %}">
                                <a href="{{ settings.ROOT_URL }}helping/bugs/">
                                    Report Website Bug
                                </a>
                            </li>
                            {% if not user.is_anonymous %}
                                {% if user.is_staff %}
                                    <li>
                                        <a href="/admin/" rel='nofollow'>
                                            Admin
                                        </a>
                                    </li>
                                {% endif %}
                                <li>
                                    <a href="{{ settings.PROFILE_URL}}" rel='nofollow'>
                                        Profile
                                    </a>
                                </li>
                                <li>
                                    <a href="/users/logout/" rel='nofollow'>
                                        {% trans "Log out" %} ({{ user.username|escape }})
                                    </a>
                                </li>
                            {% else %}
                                <li>
                                    <a href="/users/login/" rel='nofollow'>                                        
                                        {% trans "Log in" %}
                                    </a>
                                </li>
                                <li class="last">
                                    <a href="/users/create/">
                                        Create Account
                                    </a>
                                </li>
                            {% endif %}
                        </ul>
                    {% endblock %}
                </div>
                <div id="breadcrumbs">               
                    <a href="">
                        TODO: VER QUE SON LOS BREADCRUMBS.
                    </a>
                    {% block breadcrumbs %}
                        {% comment %}
                            <a href="{{ settings.ROOT_URL }}">PyCon 2010</a> &#8250;
                        {% endcomment %}
                        {% for crumb in crumbs %}
                            {% if not forloop.first %}
                                {% ifnotequal forloop.counter 2 %} 
                                    &#8250; 
                                {% endifnotequal %}
                                <a href="{{ crumb.path }}">{{ crumb.name }}</a>
                            {% endif %}
                        {% endfor %}
                    {% endblock %}
                </div>
            </div>
        </div>
        <div id="nav">
            {% block navbar %}
                {% load menu %}
                {% load cache %}
                {% for navbar in navbars %}
                    <div id="nav-{{ forloop.counter|cssnumber }}">
                        <ul>
                            {% for entry in navbar %}
                                <li>
                                    <a class="{% if entry.selected %}active{% endif %}{% if forloop.last %} last{% endif %}" href="{{ entry.url }}" {% if entry.title %}title="{{ entry.title|escape }}"{% endif %}>
                                        {{ entry.name|escape }}
                                    </a>
                                </li>
                            {% endfor %}
                        </ul>
                        <div class="defloat">&nbsp;</div>
                    </div>
                {% endfor %}
            {% endblock %}
            <div class="ghost">&nbsp;</div>
        </div>
    </td>
</tr>
